package com.dingwen.treasure.mybatisplus.service;

import com.dingwen.treasure.base.enums.ActivityStatusEnum;
import com.dingwen.treasure.model.entity.ActivityInfo;

import java.util.Optional;

/**
 * 　ActivityInfoService
 * 　@author dingwen
 * 　@date 2022/5/14$
 */
public interface ActivityInfoService {

    /**
     * 按id查找
     *
     * @param activityId 活动id
     * @return {@link Optional}<{@link ActivityInfo}>
     */
    Optional<ActivityInfo> findById(Long activityId);
    /**
     * 改变状态
     *
     * @param beforeStatus 变更前状态
     * @param afterStatus  变更后状态
     * @param activityId   活动id
     * @return {@link Boolean}
     */
    Boolean changeStatus(ActivityStatusEnum beforeStatus, ActivityStatusEnum afterStatus, Long activityId);
}
